package com.xiang.mall.platform.ac

import com.xiang.mall.platform.uc.client.UserInfoClient
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner

/**
 * @author xiangliyou
 * @email xiangliyou1814@mail.yneusoft.com
 * @date 2019-03-13 11:06
 *
 */
@RunWith(SpringRunner::class)
@SpringBootTest
class AuthApplicationTest {

    @Autowired
    private lateinit var client: UserInfoClient

    @Test
    fun testAddUserInfo() {

    }

    @Test
    fun testUserInfo() {
        val user = client.findUserByUsername("abc")
        if (user.id > 0) {
            println(user.toString())
        } else {
            println("用户未注册")
        }
    }

}